package com.andong.mapper;

import com.andong.domain.entity.SubjectFour;
import com.andong.domain.entity.SubjectOne;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Collection;
import java.util.List;

/**
* @author 王海云
* @description 针对表【subject_one(科目一题库表)】的数据库操作Mapper
* @createDate 2024-01-06 20:44:48
* @Entity com.andong.domain.entity.SubjectOne
*/
@Mapper
public interface SubjectFourMapper extends BaseMapper<SubjectFour> {
    @Select("SELECT * FROM subject_four WHERE LENGTH(answer) = 1 ORDER BY RAND() LIMIT 40;")
    List<SubjectFour> getForty();

    @Select("SELECT * FROM subject_four WHERE LENGTH(answer) > 1 ORDER BY RAND() LIMIT 10;")
    List<SubjectFour> getTen();
}




